const state = {
	overviewItem: null,
	appItem: null,
	appId: null
};

const mutations = {
	SET_APP_ITEM(state, value) {
		sessionStorage.setItem("appItem", value);
		if (value) {
			state.appItem = JSON.parse(value);
			state.appId = state.appItem.appId;
		} else {
			state.appItem = value;
			state.appId = null
		}
	},
	SET_OVERVIEW_ITEM(state, value) {
		if (value) {
			state.overviewItem = Object.assign({}, value);
		} else {
			state.overviewItem = null;
		}
	}
};

const actions = {};

const getters = {};

export default {
	state,
	mutations,
	actions,
	getters
}
